<template>
  <div class="app">
    <child @func="getMsgFormSon"></child>
  </div>
</template>

<script>
import child from "./Child1";
export default {
  data() {
    return {
      msgFormSon: "this is msg"
    }
  },
  components: {
    child,
  },
  methods: {
    getMsgFormSon(data) {
      this.msgFormSon = data
      alert("我是子组件")
    }
  }
}
</script>

<style scoped>

</style>